#pragma once
#include"Red_Black_Tree.h"



namespace MySet 
{
	template<class k>
	class set
	{
		class extract
		{
		public:

			k operator()(const k& kk)  
			{
				return kk;
			}
		};

	public:

		typedef typename RBTree<k, k, extract>::const_iterator iterator;
		typedef typename RBTree<k, k, extract>::const_iterator const_iterator; 

		bool Finc(const k& k)  
		{
			return _s.Find(k).second;
		}

		iterator begin() 
		{
			return _s.begin();       
		}

		iterator end() 
		{
			return _s.end(); 
		}

		const_iterator begin() const  
		{
			return _s.begin();   
		}

		const_iterator end() const       
		{
			return _s.end();      
		}

		pair<iterator, bool> Insert(const k& key) 
		{
			return _s.Insert(key);

	}

		RBTree<k, k, extract> _s; 
	};
	
}